package com.dx_society.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serializable;
import java.util.Date;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.Data;

/**
 * 社团活动
 *
 * @TableName dx_activities
 */
@TableName(value = "dx_activities")
@Data
public class Activities implements Serializable {
    /**
     *
     */
    @TableId(type = IdType.AUTO)
    @JsonSerialize(using = ToStringSerializer.class)
    private Long acId;

    /**
     * 活动名称
     */
    private String acName;

    /**
     * 活动详细内容
     */
    private String acDetail;

    /**
     * 活动地点
     */
    private String acAddress;

    /**
     * 活动开始时间
     */
    private Date acStarttime;

    /**
     * 结束时间
     */
    private Date acEndtime;

    /**
     * 举办社团
     */
    private Long acSocietyId;

    /**
     * 举办社团名称
     */
    private String acSocietyName;

    /**
     * 活动参加综测分
     */
    private Integer acScout;

    /**
     * 活动封面url
     */
    private String acImage;

    /**
     * 活动报名人数
     */
    private Long acCount;

    /**
     * 活动发起人id
     */
    private Long acManagerId;

    /**
     * 活动发起人姓名
     */
    private String acManagerName;
    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Activities other = (Activities) that;
        return (this.getAcId() == null ? other.getAcId() == null : this.getAcId().equals(other.getAcId()))
                && (this.getAcName() == null ? other.getAcName() == null : this.getAcName().equals(other.getAcName()))
                && (this.getAcDetail() == null ? other.getAcDetail() == null : this.getAcDetail().equals(other.getAcDetail()))
                && (this.getAcAddress() == null ? other.getAcAddress() == null : this.getAcAddress().equals(other.getAcAddress()))
                && (this.getAcStarttime() == null ? other.getAcStarttime() == null : this.getAcStarttime().equals(other.getAcStarttime()))
                && (this.getAcEndtime() == null ? other.getAcEndtime() == null : this.getAcEndtime().equals(other.getAcEndtime()))
                && (this.getAcSocietyId() == null ? other.getAcSocietyId() == null : this.getAcSocietyId().equals(other.getAcSocietyId()))
                && (this.getAcSocietyName() == null ? other.getAcSocietyName() == null : this.getAcSocietyName().equals(other.getAcSocietyName()))
                && (this.getAcScout() == null ? other.getAcScout() == null : this.getAcScout().equals(other.getAcScout()))
                && (this.getAcImage() == null ? other.getAcImage() == null : this.getAcImage().equals(other.getAcImage()))
                && (this.getAcCount() == null ? other.getAcCount() == null : this.getAcCount().equals(other.getAcCount()))
                && (this.getAcManagerId() == null ? other.getAcManagerId() == null : this.getAcManagerId().equals(other.getAcManagerId()))
                && (this.getAcManagerName() == null ? other.getAcManagerName() == null : this.getAcManagerName().equals(other.getAcManagerName()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getAcId() == null) ? 0 : getAcId().hashCode());
        result = prime * result + ((getAcName() == null) ? 0 : getAcName().hashCode());
        result = prime * result + ((getAcDetail() == null) ? 0 : getAcDetail().hashCode());
        result = prime * result + ((getAcAddress() == null) ? 0 : getAcAddress().hashCode());
        result = prime * result + ((getAcStarttime() == null) ? 0 : getAcStarttime().hashCode());
        result = prime * result + ((getAcEndtime() == null) ? 0 : getAcEndtime().hashCode());
        result = prime * result + ((getAcSocietyId() == null) ? 0 : getAcSocietyId().hashCode());
        result = prime * result + ((getAcSocietyName() == null) ? 0 : getAcSocietyName().hashCode());
        result = prime * result + ((getAcScout() == null) ? 0 : getAcScout().hashCode());
        result = prime * result + ((getAcImage() == null) ? 0 : getAcImage().hashCode());
        result = prime * result + ((getAcCount() == null) ? 0 : getAcCount().hashCode());
        result = prime * result + ((getAcManagerId() == null) ? 0 : getAcManagerId().hashCode());
        result = prime * result + ((getAcManagerName() == null) ? 0 : getAcManagerName().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", acId=").append(acId);
        sb.append(", acName=").append(acName);
        sb.append(", acDetail=").append(acDetail);
        sb.append(", acAddress=").append(acAddress);
        sb.append(", acStarttime=").append(acStarttime);
        sb.append(", acEndtime=").append(acEndtime);
        sb.append(", acSocietyId=").append(acSocietyId);
        sb.append(", acSocietyName=").append(acSocietyName);
        sb.append(", acScout=").append(acScout);
        sb.append(", acImage=").append(acImage);
        sb.append(", acCount=").append(acCount);
        sb.append(", acManagerId=").append(acManagerId);
        sb.append(", acManagerName=").append(acManagerName);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}